package com.baway.router

import com.alibaba.android.arouter.facade.Postcard
import com.alibaba.android.arouter.facade.callback.NavigationCallback
import com.baway.base.path.RouterPath

/**
 * Author: Jason Zhang
 * Date: 2025/8/19
 * Desc: 局部降级策略
 */
class LocalDegradeCallBack(private val path: String = "", private val group: String = ""): NavigationCallback {

    //找到下一个页面
    override fun onFound(postcard: Postcard?) {

    }

    //找不到下一个页面
    override fun onLost(postcard: Postcard?) {
        postcard?.group = RouterPath.GROUP_EMPTY
        postcard?.path = RouterPath.PATH_EMPTY_PAGE
        postcard?.navigation()
    }

    //成功到达下一个页面
    override fun onArrival(postcard: Postcard?) {

    }

    //调转页面被拦截
    override fun onInterrupt(postcard: Postcard?) {

    }


}